Purpose:
Getting back in the groove
Points:
25
Due:
01-19-2006 at class time
Instructor: Dana Steil
Turn
In: Source code on
Easel.
Goal:
Write a c++ program that reports on dice represented in a
bitmap.
Start with this code: dice.cpp
This program reads a bitmap into a data structure. Part of that data structure is a single dimension
array named Pixels that
contains all of the pixels in the bitmap.
Each pixel’s color is represented by an RGB value. 255 255
255 represents a white pixle
and 0 0 0 represents a
black pixel. You will also need to know
the width and the height of the bitmap.
These values can be found in the CInfoHeader.
Bitmap Description
Option 1 – Earn at most 19 points.
Assume that the bitmap contains
only one die with no border. Report the
face value of the one die. Example: SingleDie.bmp & OddSingleDie.bmp
Option 2 – Earn the full 25 points.
The bitmap may contain multiple dice. All dice will have single pixel black borders. Report the total value of all of dice that appear. Examples: MultipleDice.bmp & OddMultipleDice.bmp
Option 3 – Earn the full 25 points + 5 bonus.
The bitmap may contain multiple dice.
All dice will have single pixel black borders.
Report the number of dice that appear in the bitmap, the face value of each
die, and the total value of all of the dice. Example: MultipleDice.bmp
Points will be deducted for poor coding style and/or poor documentation.